package com.springboot.messagewall.service;


import com.springboot.messagewall.model.MessageInfo;
import com.springboot.messagewall.mapper.MessageInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description :
 * User: jiume
 * Date: 2025-03-23
 * Time: 14:37
 */
@Service
public class MessageInfoService {

    @Autowired
    private MessageInfoMapper messageInfoMapper;

    public void insertMessageInfo(MessageInfo messageInfo) {
        messageInfoMapper.insertMessageInfo(messageInfo);
    }

    public List<MessageInfo> selectAllMessage() {
        return messageInfoMapper.selectAllMessageInfo();
    }

    public void deleteMessage(MessageInfo messageInfo) {
        messageInfoMapper.deleteMessage(messageInfo);
    }
}
